log.info(param);
// todo: 参数处理 start
if(param.isEmpty())
{
    param = [
            "dataId":"",//数据id 61823874cc575100010c5bc7
            "objectAPI":"object_mGMjl__c",//对象api
            "dataNumber":"",//数据编号
            "removeDataId":"",
            "intefaceType":"",//全部，或者说增删除等
            //"sAccount_id":"",
            "url":"",
            "requestValue":[:]

    ]
}
Map mReturnThisInteface = [:];
Map ceMap=[:];
String errorCode="";
log.info("param===="+param)
Map mHeader = ["Content-Type":"application/json;charset=utf-8"];
String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCeOLl2DGEuKHmeCkFtwKjKn+DGLZzchfp/ZMC3UZTJuDgbBzaoMgT9nRpIj/2DtFdDnErhlDVdJp+n0AzcBjf0xZHQGggnri2fgqD73b0HWF2Z9vtt8axfE4LcLmwIyt4Qc1jFLcZRmOSR/zqY4xO/9O9ZmD/mA0OzR6yUYc8EvE7mln/z830LTIuczGfUhO4X3jsJB0RSvSYqquZZpUibS25uMd4fzCmuVdu6loROV1MwpkXINSAfp6rIokgyQYTOids2R4mjb3xw0WDVv23fyTIOKsRg0tUUoWYufIJi8m0O4pQjlk6tS5s6dnuIjF7YCUi6jLauX95Xjo9qArP3AgMBAAECggEANoaD21uuzdJi/wS3wZPoV1O7iXBEo3aEegyFoWc66D1VEHNu8Y2zTJcsbJ86lX27qPAemhiSP1TFJna7R8PY2sCPXHDsKIiM7nB8++9RakuYjiugQCZN6cH2kdxpnKoU1wR5LhJ1Sr9u3aVgUznGH5vQNEcUlja/yPPFVKlUR2P2dFLNnoDjgmG37QOz7kPfUPAxhewAPTxGGGAGwtesd6zELWg3BgYf3Zu67JghYYXlBVsgzIgI9soEr7VRIycAQgbGrSc/qQBYC3LVHfHTbgSZdWaBh6JoqUcbn+3SkQT9bpuKTh6Tk8kYrPb3B438pFFvxcey5SD7iHxXIrDUYQKBgQDa6EmGwvspzCd0qrFMrho3il62sjsmJ06Ldzbac4DCxEYmEEBNMdLQYEvgjEOcn2MSGYX+5Cl0daoUox7nL4HFLkXym0LW69BEn68eXR+VHscs1507YiiTa5zFWh4OViBelPMkf+E/gntICTxoFfdCL2KqnugOClT5MjX8ntXOkQKBgQC5CAXtMgedqz5oj3kqBZq4rKy/4VmTh3RqVrWVaoqXMJY5daP8HDgOGbXHcczbrBsdm+y8MFTsOtzkH3AILGF4luzE0mbcZ4dytzk3xgUnf+kxAAJsCEoE9Cj97FNz6nU9pUfN7XFHlqtpwm6F21QgXKNC7ViMVuAkusyAFEwuBwKBgFU0lvHqUOK7ARyLGAnVtoSpyiXoh9dY81yboXE0BglJZliIeM7TNtA+uyoCzopXC7PO1XYaDvyyk+oGeA/aUPOUCEvfHQwUq3MaiIoUCyf62+HbZurnUQ3YlCPI6OwBoAXQijdJwz36JswqNCX7bsuHMCtjQMW+RcbdQWA73tLRAoGAZOqbUOMYhEYBo8Wcr+6elFqZXY3q7SvTsqvYHcYeEJfPV0dySO6bJBWhr0XCFY2ovF1uoLU7nBv+ne0HjW2nO74VJMQcldlhZo/IBUNbTE/XP4Jhz8o1lL4WHWfnnDEkAJtErmvyfLkQhH4nCZq2J3BfGwGYafJ4DZBUOQbZBcECgYAzjVWw3uxjwyNg7kJFJVTC29JODhIEbsw2BNVRnYNpJnp7SRTRVBT86to/pveWTAArUNHXiPEYQr68BE+w+Lpl+lwv/+UktrNKMD+Vw0ctDTFAZ5+B7NeYxnDAZ9qCnsDoiER4IVYPdIOunz2NwE7sGRxABlYiixXRUhXqvfjsgw==";
String sPlainText = "Lierda";
String encryptData = Fx.crypto.RSA.sign("SHA256",privateKey,sPlainText);
String TransCode = param["TransCode"] as String;
String operator=param["operator"] as String;
List receiverIds = ["1000","1004"];
receiverIds.add(operator);
String targetSystem = param["targetSystem"] as String;
String isESB = param["isESB"] as String;
if(isESB == "true"){
    String sourceSystem = param["sourceSystem"] as String;
    String serviceName = param["serviceName"] as String;
    mHeader.put("sourceSystem", sourceSystem);
    mHeader.put("targetSystem", targetSystem);
    mHeader.put("serviceName",  serviceName);
}
String sDataId    = param["dataId"] as String;//数据id
//log.info("数据ID===="+sDataId)
String sObjectAPI = param["objectAPI"] as String;//对象api
String sReoveDateId = param["removeDataId"] as String;//作废数据的ERPCODE
String sintefaceType = param["intefaceType"] as String;//一个对象有多个接口，用这个进行区分
String U9InterFaceType = param["U9InterFaceType"] as String;
//String sAccount_id = Param["sAccount_id"] as String;
String sDataName  = param["dataNumber"];//数据主属性
// todo: 参数处理 end
if(sintefaceType == "查询")
{
    log.info("查询接口-----------------");
    String sSelectUrl = param["url"] as String;
    Map mDataSelect = param["requestValue"] as Map;
    Map mRequestSelect = [
            "data":mDataSelect,
            "plainText":"Lierda",
            "msgSign":encryptData
    ];
    //log.info(sSelectUrl);
    //log.info(mRequestSelect);
    def (Boolean errorSelect,HttpResult dataSelect,String errorMessageSelect) =  Fx.http.post(sSelectUrl,mHeader,mRequestSelect, 60000, false, 0, false);
    //log.info("errorSelect:"+errorSelect);
    //log.info("dataSelect:"+dataSelect);
    log.info("errorMessageSelect:"+errorMessageSelect);
    if(!errorSelect)
    {
        log.info("inteface:"+dataSelect);
        Map mContent = dataSelect.content as Map;
        String errorMessage = mContent["errorMessage"] as String;
        if(errorMessage == "OK")
        {
            String sDataReturnEncrypt = mContent["data"] as String;
            if(sDataReturnEncrypt != null && !sDataReturnEncrypt.isEmpty())
            {
                String sReturnCryto = Fx.crypto.RSA.decrypt(privateKey, sDataReturnEncrypt) as String;
                log.info("解密后的结果:"+sReturnCryto);
                Map mChange = Fx.json.parse(sReturnCryto) as Map;
                //log.info("转换成MAP的结果："+mChange);
                mReturnThisInteface = mChange;
            }
            else
            {
                mReturnThisInteface = mContent;
            }
        }
        else
        {
            log.info("接口报错----------处理日志");
            String sErrorDescription = mContent["errorDescription"] as String;
            log.info("sErrorDescription:"+sErrorDescription);
            def (Boolean error12,Map data12,String errorMessage12) = Fx.object.findDescribe(sObjectAPI)
            log.info("data12==="+data12)
            String ApiName=data12["display_name"] as String
            def(Boolean errorC,Map dataC,String errorMessageC) = Fx.object.create("object_wI7m7__c",
                    [
                            "name":ApiName,
                            "field_t88Tb__c":false,
                            "field_hGvko__c":sDataId,
                            "field_SOcb9__c":sDataName,
                            "field_rnm2f__c":mDataSelect,
                            "field_fQ5jC__c":sErrorDescription,
                            "field_c0ayp__c":sintefaceType
                    ],null,false);
            if(errorC)
            {
                log.info("创建日志表错误:"+errorMessageC);
            }
        }
    }
    else
    {
        log.info("接口报错----------处理日志");
        def (Boolean error12,Map data12,String errorMessage12) = Fx.object.findDescribe(sObjectAPI)
        log.info("data12==="+data12)
        String ApiName=data12["display_name"] as String
        def(Boolean errorC,Map dataC,String errorMessageC) = Fx.object.create("object_wI7m7__c",
                [
                        "name":ApiName,
                        "field_t88Tb__c":false,
                        "field_hGvko__c":sDataId,
                        "field_SOcb9__c":sDataName,
                        "field_rnm2f__c":mDataSelect,
                        "field_fQ5jC__c":errorMessageSelect,
                        "field_c0ayp__c":sintefaceType
                ],null,false);
        if(errorC)
        {
            log.info("创建日志表错误:"+errorMessageC);
        }

    }



}
else
{
    if(sReoveDateId != null && sReoveDateId != "")
    {
        log.info("作废接口处理------------------");
        log.info("查询对应对象的信息----------------");
        def (Boolean errorFindObject,QueryResult dataFindObject,String errorMessageFindObject) =  Fx.object.find("object_j540J__c",[["field_fylcg__c":sObjectAPI,"field_10D6V__c":sintefaceType]],10,0);
        log.info("查询到的数量："+dataFindObject.size);
        if(dataFindObject.size > 0)
        {
            List lObject                              = dataFindObject.dataList as List;
            Map mObject                               = lObject.get(0) as Map;
            String sUrl                               = mObject["field_E40pg__c"] as String;//请求的URL
            String sRequestERPAPI                     = mObject["field_f7aaD__c"] as String;//请求的时候ERPID的API名称
            log.info("sRequestERPAPI:"+sRequestERPAPI);
            Map mDataRequest = ["life_status":"invalid"] ;
            mDataRequest.put(sRequestERPAPI,sReoveDateId);
            Map mRequestParam = [
                    "msgSign":encryptData,
                    "plainText":"Lierda",
                    "data":mDataRequest
            ];
            log.info(mRequestParam);
            def (Boolean errorInteface,HttpResult dataInteface,String errorMessageInteface) =  Fx.http.post(sUrl,mHeader,mRequestParam, 60000, false, 0, false);
            log.info("接口返回的数据："+dataInteface);
            ceMap=dataInteface["content"] as Map
            errorCode=ceMap["errorCode"] as String
            log.info("ceMap=====1====="+ceMap)
        }
    }
    else // todo: 新增或更新操作
    {
        // todo: 处理数据start
        log.info("查询对应对象的信息----------------新增或更新");
        def (Boolean errorFindObject,QueryResult dataFindObject,String errorMessageFindObject) =  Fx.object.find("object_Wnsmb__c",[["field_fd463__c":sObjectAPI,"field_VP889__c":sintefaceType]],10,0);
        log.info("查询到的数量："+dataFindObject.size);
        if(dataFindObject.size > 0)
        {
            List lObject                              = dataFindObject.dataList as List;
            Map mObject                               = lObject.get(0) as Map;
            String sObjectId                          = mObject["_id"] as String;//对象数据id
            String sName                              = mObject["name"] as String;//对象名称
            String sErpApi                            = mObject["field_98M77__c"] as String;//在CRM中保存ERPID的API
            String sUrl                               = mObject["field_TXg6M__c"] as String;//请求的URL
            String sRequestERPAPI                     = mObject["field_Xe1bo__c"] as String;//请求的时候ERPID的API名称
            log.info("sObjectId："+sObjectId+"--sErpApi:"+sErpApi+"--URL:"+sUrl);
            Map mRequestValue                         = [:];
            List lSubRequestValue                     = [];
            log.info("查询对应的字段表---------------");
            def (Boolean errorFindField,QueryResult dataFindField,String errorMessageFindField) =  Fx.object.find("object_zm6qZ__c",[["field_51olf__c":sObjectId]],100,0);
            log.info("字段查到的数量："+dataFindField.size);
            if(dataFindField.size > 0)
            {
                List lField = dataFindField.dataList as List;
                log.info("查询这条数据的信息----------------");
                log.info("sObjectAPI:"+sObjectAPI);
                log.info("sDataId:"+sDataId);
                //Replace-Tag1:def (Boolean errorFindData,Map dataFindData,String errorMessageFindData) =  Fx.object.findById(sObjectAPI,sDataId);
                Map dataFindData = Tools.findById(sObjectAPI,sDataId);
                if(dataFindData)
                {
                    String sDataERPID = dataFindData[sErpApi] as String;
                    sDataName = dataFindData["name"] as String;
                    //if(sDataERPID != null && sDataERPID != "")
                    //{
                    mRequestValue.put(sRequestERPAPI,sDataERPID);
                    //}
                    lField.each
                            {
                                fieldItem ->
                                    String sCRMAPI   = fieldItem["field_88q2a__c"] as String;//crm字段API
                                    String sERPAPI   = fieldItem["field_Y6sZ2__c"] as String;//ERP接口API
                                    String sFieldType= fieldItem["field_nPAdb__c"] as String;//字段类型
                                    //log.info("sCRMAPI:"+sCRMAPI+"--sERPAPI:"+sERPAPI+"--sFieldType:"+sFieldType);

                                    if(sFieldType == "option1")
                                    {
                                        //log.info("单选-----------");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        if(FieldValue != null && FieldValue != "")
                                        {
                                            def (Boolean errorOption,String dataOpion,String errorMessageOption) = Fx.object.getOptionName(sObjectAPI,sCRMAPI,FieldValue);
                                            mRequestValue.put(sERPAPI,dataOpion);
                                        }else{
                                            mRequestValue.put(sERPAPI,FieldValue);
                                        }

                                    }
                                    if(sFieldType == "7r8e37zlK")
                                    {
                                        log.info("查找关联-------");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        if(FieldValue != null && FieldValue != "")
                                        {
                                            String sRelObject = fieldItem["field_j0g6Y__c"] as String;//关联对象
                                            String sRelField = fieldItem["field_e8u81__c"] as String;//关联对象取值字段的API
                                            log.info("查询对象数据-----------------");
                                            def (Boolean errorFindRelData,Map dataFindRelData,String errorMessageFindRelData) =  Fx.object.findById(sRelObject,FieldValue);
                                            if(!errorFindRelData)
                                            {
                                                String sRelCode = dataFindRelData[sRelField] as String;
                                                log.info("before-sRelField:"+sRelField+"----before-sRelCode:"+sRelCode);
                                                mRequestValue.put(sERPAPI,sRelCode);
                                                if(sRelField=="field_bSq4m__c"||sRelField=="field_Dojs8__c"||sRelField=="field_tB77n__c"){
                                                    if(sRelCode!=null){
                                                        if(sRelCode.startsWith("[")&&sRelCode.endsWith("]")){
                                                            sRelCode=sRelCode.replace("[","");
                                                            sRelCode=sRelCode.replace("]","");
                                                        }
                                                    }
                                                    log.info("sRelField:"+sRelField+"----sRelCode:"+sRelCode);
                                                    def (Boolean errorPerson,Map dataPerson,String errorMessagePerson) =  Fx.object.findById("PersonnelObj",sRelCode);
                                                    if(!errorPerson)
                                                    {
                                                        String sPersonCode = dataPerson["employee_number"] as String;
                                                        mRequestValue.put(sERPAPI,sPersonCode);
                                                    }else{
                                                        mRequestValue.put(sERPAPI,"");
                                                    }
                                                }
                                                //mRequestValue.put(sERPAPI,sRelCode);
                                            }
                                        }else{
                                            mRequestValue.put(sERPAPI,FieldValue);
                                        }

                                    }
                                    if(sFieldType == "020W1E1t9")
                                    {
                                        log.info("文本");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        log.info("FieldValue:"+FieldValue);
                                        //if(FieldValue != null && FieldValue != "")
                                        //{
                                        mRequestValue.put(sERPAPI,FieldValue);
                                        //}

                                    }
                                    if(sFieldType == "DefaultValue")
                                    {
                                        log.info("固定值-------");
                                        //String FieldValue = dataFindData[sCRMAPI] as String;
                                        mRequestValue.put(sERPAPI,sCRMAPI);

                                    }
                                    if(sFieldType == "1M0P6Xdoa")
                                    {
                                        log.info("人员------------");
                                        List FieldValue = dataFindData[sCRMAPI] as List;
                                        if(FieldValue != null && !FieldValue.isEmpty())
                                        {
                                            //log.info("查询人员对象-------------------");
                                            String sPersonId = FieldValue.get(0) as String;
                                            def (Boolean errorPerson,Map dataPerson,String errorMessagePerson) =  Fx.object.findById("PersonnelObj",sPersonId);
                                            if(!errorPerson)
                                            {
                                                String sPersonCode = dataPerson["employee_number"] as String;
                                                mRequestValue.put(sERPAPI,sPersonCode);
                                            }else{
                                                mRequestValue.put(sERPAPI,"");
                                            }

                                        }
                                    }
                                    if(sFieldType == "Z6ssX91ZG")
                                    {
                                        log.info("部门-----------"+dataFindData);
                                        List FieldValue = dataFindData[sCRMAPI] as List;
                                        if(FieldValue != null && !FieldValue.isEmpty())
                                        {
                                            String sDepartmentId = FieldValue.get(0) as String;
                                            if(sDepartmentId != null && sDepartmentId != "")
                                            {
                                                log.info("查询部门对象-------------------");
                                                def (Boolean errorDepartment,Map dataDepartment,String errorMessageDepartment) =  Fx.object.findById("DepartmentObj",sDepartmentId);
                                                if(!errorDepartment)
                                                {
                                                    String sDepartmentCode = dataDepartment["dept_code"] as String;
                                                    mRequestValue.put(sERPAPI,sDepartmentCode);
                                                }else{
                                                    mRequestValue.put(sERPAPI,"");
                                                }
                                            }
                                        }

                                    }
                                    if(sFieldType == "tv2Kp1L5g")
                                    {
                                        log.info("国家-------------");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        if(FieldValue != null && FieldValue != "")
                                        {
                                            String label = Fx.location.findCountryAreaLabel(FieldValue,"country");
                                            mRequestValue.put(sERPAPI,label);
                                        }else{
                                            mRequestValue.put(sERPAPI,"");
                                        }
                                    }
                                    if(sFieldType == "aV1Ha5kDM")
                                    {
                                        log.info("省-------------");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        if(FieldValue != null && FieldValue != "")
                                        {
                                            String label = Fx.location.findCountryAreaLabel(FieldValue,"province");
                                            mRequestValue.put(sERPAPI,label);
                                        }else{
                                            mRequestValue.put(sERPAPI,"");
                                        }
                                    }
                                    if(sFieldType == "bR1X36uVd")
                                    {
                                        log.info("市-------------");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        if(FieldValue != null && FieldValue != "")
                                        {
                                            String label = Fx.location.findCountryAreaLabel(FieldValue,"city");
                                            mRequestValue.put(sERPAPI,label);
                                        }else{
                                            mRequestValue.put(sERPAPI,"");
                                        }
                                    }
                                    if(sFieldType == "DcYymu2h3")
                                    {
                                        log.info("区-------------");
                                        String FieldValue = dataFindData[sCRMAPI] as String;
                                        if(FieldValue != null && FieldValue != "")
                                        {
                                            String label = Fx.location.findCountryAreaLabel(FieldValue,"district");
                                            mRequestValue.put(sERPAPI,label);
                                        }else{
                                            mRequestValue.put(sERPAPI,"");
                                        }
                                    }
                            }
                }
            }
            log.info("----------处理子表数据--------------");
            log.info("查询有没有对应的子对象---------");
            Boolean bFlag = false;//主从一起传输标记
            def (Boolean errorFindSubObjct,QueryResult dataFindSubObjct,String errorMessageFindSubObjct) =  Fx.object.find("object_Wnsmb__c",[["field_8if6a__c":sObjectId,"field_VP889__c":sintefaceType]],10,0);
            log.info("查询得到子对象的数据："+dataFindSubObjct.size);
            String sSubObjectAPI    = "";
            String sSubErpApi       = "";
            String sSubRelObjectApi = "";
            String sSubRequestERPAPI= "";
            if(dataFindSubObjct.size > 0)
            {
                bFlag                   = true;
                List lSubObject         = dataFindSubObjct.dataList as List;
                Map mSubObject          = lSubObject.get(0) as Map;
                String sSubObjectId     = mSubObject["_id"] as String;
                sSubObjectAPI    = mSubObject["field_fd463__c"] as String;//子对象API
                sSubErpApi       = mSubObject["field_98M77__c"] as String;//在CRM中保存ERPID的API
                sSubRelObjectApi = mSubObject["field_4gpIC__c"] as String;//查询关联字段的API
                sSubRequestERPAPI= mSubObject["field_Xe1bo__c"] as String;//请求的时候ERPID的API名称
                log.info("sSubObjectAPI :"+sSubObjectAPI+"--sSubRelObjectApi:"+sSubRelObjectApi+"--sSubRequestERPAPI:"+sSubRequestERPAPI);
                log.info("查询子对象对应的字段------");
                def (Boolean errorFindSubField,QueryResult dataFindSubField,String errorMessageFindSubField) =  Fx.object.find("object_zm6qZ__c",[["field_51olf__c":sSubObjectId]],100,0);
                log.info("查询得到的子对象字段数量："+dataFindSubField.size);
                if(dataFindSubField.size > 0)
                {
                    List lSubField = dataFindSubField.dataList as List;
                    Map mSearch = [:];
                    mSearch.put(sSubRelObjectApi, sDataId);
                    def (Boolean errorFindSubData,QueryResult dataFindSubData,String errorMessageFindSubData) =  Fx.object.find(sSubObjectAPI,[mSearch],100,0);
                    log.info("errorMessageFindSubData:"+errorMessageFindSubData);
                    log.info("查询到的子对象数据条数："+dataFindSubData.size);
                    if(dataFindSubData.size > 0)
                    {
                        List lSubData = dataFindSubData.dataList as List;

                        lSubData.each
                                {
                                    subDataItem ->
                                        Map mSubRequest     =[:];
                                        String sSubDataERPID = subDataItem[sSubErpApi] as String;
                                        if(sSubDataERPID != null && sSubDataERPID != "")
                                        {
                                            mSubRequest.put(sSubRequestERPAPI,sSubDataERPID);
                                        }else{
                                            mSubRequest.put(sSubRequestERPAPI,sSubDataERPID);
                                        }
                                        lSubField.each
                                                {
                                                    subFieldItem ->
                                                        String sSubCRMAPI   = subFieldItem["field_88q2a__c"] as String;//crm字段API
                                                        String sSubERPAPI   = subFieldItem["field_Y6sZ2__c"] as String;//ERP接口API
                                                        String sSubFieldType= subFieldItem["field_nPAdb__c"] as String;//字段类型
                                                        log.info("sSubCRMAPI:"+sSubCRMAPI+"--sSubERPAPI:"+sSubERPAPI+"--sSubFieldType:"+sSubFieldType);

                                                        if(sSubFieldType == "option1")
                                                        {
                                                            log.info("单选-----------");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                def (Boolean errorOption,String dataOpion,String errorMessageOption) = Fx.object.getOptionName(sSubObjectAPI,sSubCRMAPI,subFieldValue);
                                                                mSubRequest.put(sSubERPAPI,dataOpion);
                                                            }else{
                                                                mSubRequest.put(sSubERPAPI,subFieldValue);
                                                            }

                                                        }
                                                        if(sSubFieldType == "7r8e37zlK")
                                                        {
                                                            log.info("查找关联-------");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                String sRelObject = subFieldItem["field_j0g6Y__c"] as String;//关联对象
                                                                String sRelField = subFieldItem["field_e8u81__c"] as String;//关联对象取值字段的API
                                                                log.info("查询对象数据-----------------");
                                                                def (Boolean errorFindRelData,Map dataFindRelData,String errorMessageFindRelData) =  Fx.object.findById(sRelObject,subFieldValue);
                                                                //Map dataFindRelData = Tools.findById(sRelObject,subFieldValue);
                                                                if(dataFindRelData==null){
                                                                    log.info("查询对象数据为空，入参为-----------------"+dataFindRelData+"====="+sRelObject+"===="+sRelField+"===="+subFieldValue+"错误信息:"+errorMessageFindRelData);
                                                                }
                                                                if(!errorFindRelData)
                                                                {
                                                                    String sRelCode = dataFindRelData[sRelField] as String;
                                                                    //log.info("sRelField:"+sRelField+"----sRelCode:"+sRelCode);
                                                                    mSubRequest.put(sSubERPAPI,sRelCode);
                                                                    if(sRelField=="field_bSq4m__c"||sRelField=="field_Dojs8__c"||sRelField=="field_tB77n__c"){
                                                                        if(sRelCode.startsWith("[")&&sRelCode.endsWith("]")){
                                                                            sRelCode=sRelCode.replace("[","");
                                                                            sRelCode=sRelCode.replace("]","");
                                                                        }
                                                                        log.info("sRelField:"+sRelField+"----sRelCode:"+sRelCode);
                                                                        def (Boolean errorPerson,Map dataPerson,String errorMessagePerson) =  Fx.object.findById("PersonnelObj",sRelCode);
                                                                        if(!errorPerson)
                                                                        {
                                                                            String sPersonCode = dataPerson["employee_number"] as String;
                                                                            mRequestValue.put(sSubERPAPI,sPersonCode);
                                                                        }else{
                                                                            mRequestValue.put(sSubERPAPI,"");
                                                                        }
                                                                    }
                                                                    //mSubRequest.put(sSubERPAPI,sRelCode);
                                                                }else{
                                                                    mSubRequest.put(sSubERPAPI,"");
                                                                }

                                                            }

                                                        }
                                                        if(sSubFieldType == "020W1E1t9")
                                                        {
                                                            log.info("文本");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                mSubRequest.put(sSubERPAPI,subFieldValue);
                                                            }else{
                                                                mSubRequest.put(sSubERPAPI,subFieldValue);
                                                            }

                                                        }
                                                        if(sSubFieldType == "DefaultValue")
                                                        {
                                                            log.info("固定值-------");
                                                            //String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            mSubRequest.put(sSubERPAPI,sSubCRMAPI);
                                                        }
                                                        if(sSubFieldType == "1M0P6Xdoa")
                                                        {
                                                            log.info("人员------------");
                                                            List subFieldValue = subDataItem[sSubCRMAPI] as List;
                                                            if(subFieldValue != null && !subFieldValue.isEmpty())
                                                            {
                                                                log.info("查询人员对象-------------------");
                                                                String sPersonId = subFieldValue.get(0) as String;
                                                                def (Boolean errorPerson,Map dataPerson,String errorMessagePerson) =  Fx.object.findById("PersonnelObj",sPersonId);
                                                                if(!errorPerson)
                                                                {
                                                                    String sPersonCode = dataPerson["employee_number"] as String;
                                                                    mSubRequest.put(sSubERPAPI,sPersonCode);
                                                                }else{
                                                                    mSubRequest.put(sSubERPAPI,"");
                                                                }

                                                            }
                                                        }
                                                        if(sSubFieldType == "Z6ssX91ZG")
                                                        {
                                                            log.info("部门-----------");
                                                            List subFieldValue = subDataItem[sSubCRMAPI] as List;
                                                            if(subFieldValue != null && !subFieldValue.isEmpty())
                                                            {
                                                                String sSubDepartmentId = subFieldValue.get(0) as String;
                                                                log.info("sSubDepartmentId:"+sSubDepartmentId);
                                                                if(sSubDepartmentId != null && sSubDepartmentId != "")
                                                                {
                                                                    log.info("查询部门对象-------------------");
                                                                    def (Boolean errorDepartment,Map dataDepartment,String errorMessageDepartment) =  Fx.object.findById("DepartmentObj",sSubDepartmentId);
                                                                    if(!errorDepartment)
                                                                    {
                                                                        String sDepartmentCode = dataDepartment["dept_code"] as String;
                                                                        mSubRequest.put(sSubERPAPI,sDepartmentCode);
                                                                    }else{
                                                                        mSubRequest.put(sSubERPAPI,"");
                                                                    }

                                                                }
                                                            }

                                                        }

                                                        if(sSubFieldType == "tv2Kp1L5g")
                                                        {
                                                            log.info("国家-------------");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                String label = Fx.location.findCountryAreaLabel(subFieldValue,"country");
                                                                mRequestValue.put(sSubERPAPI,label);
                                                            }else{
                                                                mRequestValue.put(sSubERPAPI,"");
                                                            }
                                                        }
                                                        if(sSubFieldType == "aV1Ha5kDM")
                                                        {
                                                            log.info("省-------------");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                String label = Fx.location.findCountryAreaLabel(subFieldValue,"province");
                                                                mRequestValue.put(sSubERPAPI,label);
                                                            }else{
                                                                mRequestValue.put(sSubERPAPI,"");
                                                            }
                                                        }
                                                        if(sSubFieldType == "bR1X36uVd")
                                                        {
                                                            log.info("市-------------");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                String label = Fx.location.findCountryAreaLabel(subFieldValue,"city");
                                                                mRequestValue.put(sSubERPAPI,label);
                                                            }else{
                                                                mRequestValue.put(sSubERPAPI,"");
                                                            }
                                                        }
                                                        if(sSubFieldType == "DcYymu2h3")
                                                        {
                                                            log.info("区-------------");
                                                            String subFieldValue = subDataItem[sSubCRMAPI] as String;
                                                            if(subFieldValue != null && subFieldValue != "")
                                                            {
                                                                String label = Fx.location.findCountryAreaLabel(subFieldValue,"district");
                                                                mRequestValue.put(sSubERPAPI,label);
                                                            }else{
                                                                mRequestValue.put(sSubERPAPI,"");
                                                            }
                                                        }

                                                }
                                        lSubRequestValue.add(mSubRequest);
                                }
                    }
                }
            }
            //log.info("请求的报文:"+mRequestValue);
            //log.info("请求的报文明细："+lSubRequestValue);
            // todo: 数据处理end
            log.info("-----------------接口调用---------------");
            if(bFlag)
            {
                log.info("说明是主从表一起请求的");
                Map detailRequestData = [:];
                detailRequestData.put(sSubObjectAPI,lSubRequestValue)
                Map mDataRequest = ["object_data":mRequestValue,"details":detailRequestData] ;
                Map mRequestParam =[:];
                if(U9InterFaceType!=null){
                    mRequestParam = [
                            "TransCode": TransCode,
                            "InterFaceType":U9InterFaceType,
                            "OperateType": sintefaceType,
                            "dataList":mDataRequest
                    ];
                }else{
                    mRequestParam = [
                            "TransCode": TransCode,
                            "OperateType": sintefaceType,
                            "dataList":mDataRequest
                    ];
                }
                //log.info("mRequestParam=====>"+mRequestParam);
                String mRequestParamJson = Fx.json.toJson(mRequestParam);
                log.info("子表对象:"+sSubObjectAPI);
                log.info("入参:"+mRequestParamJson);
                def (Boolean errorInteface,HttpResult dataInteface,String errorMessageInteface) =  Fx.http.post(sUrl,mHeader,mRequestParamJson, 60000, false, 0, false);
                log.info("接口返回的数据："+dataInteface);
                  //===============日志表=============end*/
                //==============发送报错提示===========start
                String statusCode=dataInteface["statusCode"] as String;
                ceMap=dataInteface["content"] as Map;
                log.info("statusCode:"+statusCode);
                if(statusCode=="200"){
                    String RetMsg =ceMap["RetMsg"] as String;
                    errorCode=ceMap["RetCode"] as String;
                    //errorCode=ceMap["errorCode"] as String
                    if(!errorCode){
                        Map pub = ceMap.pub as Map
                        if(pub){
                            errorCode = pub.RetCode as String
                            RetMsg = pub.RetMsg as String
                        }else{
                            errorCode = ceMap.stsus as String
                        }
                    }
                    log.info("ceMap=====2=====:"+ceMap);
                    log.info("RetMsg=====3====="+RetMsg);
                    Map mUpdateTmp = [:];
                    if(errorCode=="300"){
                        mUpdateTmp.put("u9_status__c","同步成功");
                        def res1 =  Fx.object.update(sObjectAPI,sDataId,mUpdateTmp,  false,  false);
                    }else if(errorCode=="500"){
                        mUpdateTmp.put("u9_status__c","同步失败");
                        def res1 =  Fx.object.update(sObjectAPI,sDataId,mUpdateTmp,  false,  false);
                        Notice objectNotify = Notice.objectNotice(sObjectAPI,sDataId);
                        def (Boolean error1, String data1, String errorMessage1) = Fx.message.sendNotice(sName,"单据号"+sDataName+"同步失败，请联系管理员，错误原因："+dataInteface,receiverIds, objectNotify);
                        if (error1) {
                            log.info(errorMessage1)
                        } else {
                            log.info(data1)
                        }
                    }
                }
                else if(statusCode=="500"){
                    log.info("接口请求----------处理日志");
                    String sDataRequest0 = mRequestParamJson as String;
                    log.info("请求报文的长度："+sDataRequest0.length());
                    if(sDataRequest0.length() > 1500)
                    {
                        sDataRequest0 = sDataRequest0.substring(0,1500);
                    }
                    def (Boolean error0,Map data0,String errorMessage0) = Fx.object.findDescribe(sObjectAPI)
                    //log.info("data0==="+data0)
                    String ApiName0=data0["display_name"] as String
                    def(Boolean errorC0,Map dataC0,String errorMessageC0) = Fx.object.create("object_5qisd__c",
                            [
                                    "name":ApiName0,
                                    "field_f1Udf__c":false,
                                    "field_bcB98__c":sDataId,
                                    "field_1pv0w__c":sDataName,
                                    "field_Dum71__c":sDataRequest0,
                                    "field_D60p2__c":dataInteface,
                                    "field_5Obqo__c":sintefaceType
                            ],null,false);
                    if(errorC0)
                    {
                        log.info("创建日志表错误:"+errorMessageC0);
                    }
                    Map mUpdateTmp = [:];
                    mUpdateTmp.put("u9_status__c","同步失败");
                    def res1 =  Fx.object.update(sObjectAPI,sDataId,mUpdateTmp,  false,  false);
                    Notice objectNotify = Notice.objectNotice(sObjectAPI,sDataId);
                    def (Boolean error1, String data1, String errorMessage1) = Fx.message.sendNotice(sName,"单据号"+sDataName+"同步失败，请联系管理员，错误原因："+dataInteface,receiverIds, objectNotify);
                    if (error1) {
                        log.info(errorMessage1)
                    } else {
                        log.info(data1)
                    }
                    return dataInteface;
                }
                //==============发送报错提示===========end
                if(errorInteface)
                {
                    log.info("接口报错----------处理日志");
                    String sDataRequest = mDataRequest as String;
                    log.info("请求报文的长度："+sDataRequest.length());
                    if(sDataRequest.length() > 1500)
                    {
                        sDataRequest = sDataRequest.substring(0,1500);
                    }
                    def (Boolean error12,Map data12,String errorMessage12) = Fx.object.findDescribe(sObjectAPI)
                    log.info("data12==="+data12)
                    String ApiName=data12["display_name"] as String
                    def(Boolean errorC,Map dataC,String errorMessageC) = Fx.object.create("object_5qisd__c",
                            [
                                    "name":ApiName,
                                    "field_f1Udf__c":false,
                                    "field_bcB98__c":sDataId,
                                    "field_1pv0w__c":sDataName,
                                    "field_Dum71__c":sDataRequest,
                                    "field_D60p2__c":errorMessageInteface,
                                    "field_5Obqo__c":sintefaceType
                            ],null,false);
                    if(errorC)
                    {
                        log.info("创建日志表错误:"+errorMessageC);
                    }
                }
                else
                {
                    String sStatus = dataInteface["statusCode"] as String;
                    Map mContent = dataInteface["content"] as Map;
                    String errorMessage = mContent["errorMessage"] as String;
                    mReturnThisInteface = mContent;
                    if(errorMessage == "OK")
                    {
                        String sDataReturnEncrypt = mContent["data"] as String;
                        if(sDataReturnEncrypt != null && !sDataReturnEncrypt.isEmpty())
                        {
                            String sReturnCryto = Fx.crypto.RSA.decrypt(privateKey, sDataReturnEncrypt) as String;
                            log.info("解密后的结果:"+sReturnCryto);
                            Map mChange = Fx.json.parse(sReturnCryto) as Map;
                            log.info("转换成MAP的结果："+mChange);
                            mReturnThisInteface = mChange;
                            log.info("更新主表erp的信息---------------");
                            Map mHeaderResponse = mChange["head"] as Map;
                            String sERPIdValue = mHeaderResponse[sRequestERPAPI] as String;
                            Map mUpdate = [:];
                            mUpdate.put(sErpApi,sERPIdValue);
                            log.info("mUpdate:"+mUpdate);
                            def (Boolean errorUpdate,Map dataUpdate,String errorMessageUpdate) =  Fx.object.update(sObjectAPI,sDataId,mUpdate,false);
                            // log.info("errorUpdate:"+errorUpdate);
                            // log.info("dataUpdate:"+dataUpdate);
                            // log.info("errorMessageUpdate:"+errorMessageUpdate);
                            if(errorUpdate)
                            {
                                log.info("更新ERP字段失败："+errorMessageUpdate);
                            }

                            log.info("更新子表信息--------------------");
                            List lBodyReponse = mChange["bodys"] as List;
                            lBodyReponse.each
                                    {
                                        responseItem ->
                                            String sBodyErpIdValue = responseItem[sSubRequestERPAPI] as String;
                                            String sBodyId = responseItem["id"] as String;
                                            Map mSubUpdate = [:];
                                            mSubUpdate.put(sSubErpApi,sBodyErpIdValue);
                                            log.info("mSubUpdate:"+mSubUpdate);
                                            def (Boolean errorSubUpdate,Map dataSubUpdate,String errorMessageSubUpdate) =  Fx.object.update(sSubObjectAPI,sBodyId,mSubUpdate,false);
                                            // log.info("errorSubUpdate:"+errorSubUpdate);
                                            // log.info("dataSubUpdate:"+dataSubUpdate);
                                            // log.info("errorMessageSubUpdate:"+errorMessageSubUpdate);
                                            if(errorSubUpdate)
                                            {
                                                log.info("更新ERP字段失败："+errorMessageUpdate);
                                            }
                                    }
                        }
                        else
                        {
                            mReturnThisInteface = mContent;
                        }
                    }
                    else
                    {
                        log.info("接口报错----------处理日志");
                        String sDataRequest = mDataRequest as String;
                        log.info("请求报文的长度："+sDataRequest.length());
                        if(sDataRequest.length() > 1500)
                        {
                            sDataRequest = sDataRequest.substring(0,1500);
                        }
                        String sErrorDescription = mContent["errorDescription"] as String;
                        def (Boolean error12,Map data12,String errorMessage12) = Fx.object.findDescribe(sObjectAPI)
                        log.info("data12==="+data12)
                        String ApiName=data12["display_name"] as String
                        def(Boolean errorC,Map dataC,String errorMessageC) = Fx.object.create("object_5qisd__c",
                                [
                                        "name":ApiName,
                                        "field_f1Udf__c":false,
                                        "field_bcB98__c":sDataId,
                                        "field_1pv0w__c":sDataName,
                                        "field_Dum71__c":sDataRequest,
                                        "field_D60p2__c":sErrorDescription,
                                        "field_5Obqo__c":sintefaceType
                                ],null,false);
                        if(errorC)
                        {
                            log.info("创建日志表错误:"+errorMessageC);
                        }
                    }
                }

            }
            else
            {
                log.info("说明是单表请求的");
                Map mDataRequest = mRequestValue;
                Map mRequestParam =[:];
                if(U9InterFaceType!=null){
                    mRequestParam = [
                            "TransCode": TransCode,
                            "InterFaceType":U9InterFaceType,
                            "OperateType": sintefaceType,
                            "dataList":mDataRequest
                    ];
                }else{
                    mRequestParam = [
                            "TransCode": TransCode,
                            "OperateType": sintefaceType,
                            "dataList":mDataRequest
                    ];
                }
                String mRequestParamJson = Fx.json.toJson(mRequestParam);
                log.info("入参:"+mRequestParamJson);
                log.info("请求地址:"+sUrl);
                def (Boolean errorInteface,HttpResult dataInteface,String errorMessageInteface) =  Fx.http.post(sUrl,mHeader,mRequestParamJson,60000, false, 0, false);
                log.info("接口返回的数据："+ errorInteface + "\n" + dataInteface + "\n" + errorMessageInteface);
                /*原代码ceMap=dataInteface["content"] as Map
                String RetMsg =ceMap["RetMsg"] as String;
                log.info("RetMsg=====3====="+RetMsg);
                errorCode=ceMap["RetCode"] as String;
                log.info("ceMap=====3====="+ceMap)
                //errorCode=ceMap["errorCode"] as String
                mReturnThisInteface = ceMap;*/
                //==============发送报错提示===========start
                String statusCode=dataInteface["statusCode"] as String;
                ceMap=dataInteface["content"] as Map;
                log.info("statusCode:"+statusCode);
                if(statusCode=="200"){
                    String RetMsg =ceMap["RetMsg"] as String;
                    errorCode=ceMap["RetCode"] as String;
                    //errorCode=ceMap["errorCode"] as String
                    if(!errorCode){
                        Map pub = ceMap.pub as Map
                        if(pub){
                            errorCode = pub.RetCode as String
                            RetMsg = pub.RetMsg as String
                        }else{
                            errorCode = ceMap.stsus as String
                        }

                    }
                    log.info("ceMap=====2=====:"+ceMap);
                    log.info("RetMsg=====3====="+RetMsg);
                    Map mUpdateTmp = [:];
                    log.info("errorCode:${errorCode}")
                    if(errorCode=="300" || errorCode == "200"){
                        mUpdateTmp.put(sErpApi,"同步成功");
                        def res1 =  Fx.object.update(sObjectAPI,sDataId,mUpdateTmp,  false,  false);
                    }else if(errorCode=="500"){
                        mUpdateTmp.put(sErpApi,"同步失败");
                        def res1 =  Fx.object.update(sObjectAPI,sDataId,mUpdateTmp,  false,  false);
                        Notice objectNotify = Notice.objectNotice(sObjectAPI,sDataId);
                        def (Boolean error1, String data1, String errorMessage1) = Fx.message.sendNotice(sName,"单据号"+sDataName+"同步失败，请联系管理员，错误原因："+dataInteface,receiverIds, objectNotify);
                        if (error1) {
                            log.info(errorMessage1)
                        } else {
                            log.info(data1)
                        }
                    }
                }
                else if(statusCode=="500"){
                    log.info("接口请求----------处理日志");
                    String sDataRequest0 = mRequestParamJson as String;
                    log.info("请求报文的长度："+sDataRequest0.length());
                    if(sDataRequest0.length() > 1500)
                    {
                        sDataRequest0 = sDataRequest0.substring(0,1500);
                    }
                    def (Boolean error0,Map data0,String errorMessage0) = Fx.object.findDescribe(sObjectAPI)
                    //log.info("data0==="+data0)
                    String ApiName0=data0["display_name"] as String
                    def(Boolean errorC0,Map dataC0,String errorMessageC0) = Fx.object.create("object_5qisd__c",
                            [
                                    "name":ApiName0,
                                    "field_f1Udf__c":false,
                                    "field_bcB98__c":sDataId,
                                    "field_1pv0w__c":sDataName,
                                    "field_Dum71__c":sDataRequest0,
                                    "field_D60p2__c":dataInteface,
                                    "field_5Obqo__c":sintefaceType
                            ],null,false);
                    if(errorC0)
                    {
                        log.info("创建日志表错误:"+errorMessageC0);
                    }
                    Map mUpdateTmp = [:];
                    mUpdateTmp.put(sErpApi,"同步失败");
                    def res1 =  Fx.object.update(sObjectAPI,sDataId,mUpdateTmp,  false,  false);
                    Notice objectNotify = Notice.objectNotice(sObjectAPI,sDataId);
                    def (Boolean error1, String data1, String errorMessage1) = Fx.message.sendNotice(sName,"单据号"+sDataName+"同步失败，请联系管理员，错误原因："+dataInteface,receiverIds, objectNotify);
                    if (error1) {
                        log.info(errorMessage1)
                    } else {
                        log.info(data1)
                    }
                    return dataInteface;
                }
                if(errorInteface)
                {
                    log.info("接口报错----------处理日志");
                    def (Boolean error12,Map data12,String errorMessage12) = Fx.object.findDescribe(sObjectAPI)
                    log.info("data12==="+data12)
                    String ApiName=data12["display_name"] as String
                    def(Boolean errorC,Map dataC,String errorMessageC) = Fx.object.create("object_5qisd__c",
                            [
                                    "name":ApiName,
                                    "field_f1Udf__c":false,
                                    "field_bcB98__c":sDataId,
                                    "field_1pv0w__c":sDataName,
                                    "field_Dum71__c":mDataRequest,
                                    "field_D60p2__c":errorMessageInteface,
                                    "field_5Obqo__c":sintefaceType
                            ],null,false);
                    if(errorC)
                    {
                        log.info("创建日志表错误:"+errorMessageC);
                    }
                }
                else
                {
                    String sStatus = dataInteface["statusCode"] as String;
                    Map mContent = dataInteface["content"] as Map;
                    String errorMessage = mContent["errorMessage"] as String;
                    if(errorMessage == "OK")
                    {
                        String sDataReturnEncrypt = mContent["data"] as String;
                        if(sDataReturnEncrypt != null && !sDataReturnEncrypt.isEmpty())
                        {
                            String sReturnCryto = Fx.crypto.RSA.decrypt(privateKey, sDataReturnEncrypt) as String;
                            log.info("解密后的结果:"+sReturnCryto);
                            Map mChange = Fx.json.parse(sReturnCryto) as Map;
                            log.info("转换成MAP的结果："+mChange);
                            mReturnThisInteface = mChange;
                            log.info("处理ERP的ID--------------------");
                            String sERPIdValue = mChange[sRequestERPAPI] as String;
                            log.info("sERPIdValue:"+sERPIdValue+"--sErpApi:"+sErpApi+"--sObjectAPI:"+sObjectAPI+"--sDataId:"+sDataId);
                            if(sERPIdValue != null && sERPIdValue != "")
                            {
                                Map mUpdate = [:];
                                mUpdate.put(sErpApi,sERPIdValue);
                                log.info("mUpdate:"+mUpdate);
                                def (Boolean errorUpdate,Map dataUpdate,String errorMessageUpdate) =  Fx.object.update(sObjectAPI,sDataId,mUpdate,false);
                                log.info("errorUpdate:"+errorUpdate);
                                log.info("dataUpdate:"+dataUpdate);
                                log.info("errorMessageUpdate:"+errorMessageUpdate);
                                if(errorUpdate)
                                {
                                    log.info("更新ERP字段失败："+errorMessageUpdate);
                                }
                            }

                        }
                        else
                        {
                            mReturnThisInteface = mContent;
                        }
                    }
                    else
                    {
                        log.info("接口报错----------处理日志");
                        String sErrorDescription = mContent["errorDescription"] as String;
                        def (Boolean error12,Map data12,String errorMessage12) = Fx.object.findDescribe(sObjectAPI)
                        log.info("data12==="+data12)
                        String ApiName=data12["display_name"] as String
                        def(Boolean errorC,Map dataC,String errorMessageC) = Fx.object.create("object_5qisd__c",
                                [
                                        "name":ApiName,
                                        "field_f1Udf__c":false,
                                        "field_bcB98__c":sDataId,
                                        "field_1pv0w__c":sDataName,
                                        "field_Dum71__c":mDataRequest,
                                        "field_D60p2__c":sErrorDescription,
                                        "field_5Obqo__c":sintefaceType
                                ],null,false);
                        if(errorC)
                        {
                            log.info("创建日志表错误:"+errorMessageC);
                        }
                    }
                }
            }
        }
    }
}

// todo: 记录操作失败日志
if(errorCode=="-2"){
    String errMessageCs=ceMap["errorDescription"]
    log.info("错误信息===="+errMessageCs)
    def (Boolean error,Map data,String errorMessage) =  Fx.object.update(sObjectAPI,sDataId,["errMeaasge__c":errMessageCs],false)
    if(error)
    {
        log.info("更新失败："+errorMessage);
    }
}

return mReturnThisInteface;